package pers.lmd.convert;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import pers.lmd.domain.dto.TeacherDTO;
import pers.lmd.domain.entity.Student;
import pers.lmd.domain.entity.Teacher;
import pers.lmd.domain.vo.StudentVO;

/**
 * @Author lmd
 * @Date 2023/5/2 18:21
 */
@Mapper
public interface StudentConvert {
    StudentConvert INSTANCES = Mappers.getMapper(StudentConvert.class);
    @Mappings({
            @Mapping(source = "name", target = "name"),
            @Mapping(source = "age", target = "age"),
            @Mapping(source = "banji", target = "banji"),
            @Mapping(source = "phone", target = "phone"),
            @Mapping(source = "email", target = "email"),
    })
    StudentVO toStudentVO(Student student);
}
